/**
 * 
 */
package com.gragra.nounIdentification;
import it.unimi.dsi.fastutil.ints.IntCollection;
import it.unimi.dsi.fastutil.ints.IntList;
import it.unimi.dsi.fastutil.ints.IntSet;
import com.gragra.frameStatistics.StatisticsGenerator;
/**
 * this interface can be used to implement the scoring criterion used by the NounIdentifier and
 * classes derived from it
 * @author Christoph Teichmann created Mar 25, 2013 10:43:57 PM
 * @version 0.1
 */
public interface Scorer
{
	/**
	 * this method returns a sorted list of all the given frames according to a score derived
	 * in some way from the statistics, the best score is first, the restriction gives the words
	 * currently judged as candidates for the class that is investigated if iteration > 0 otherwise
	 * it contains all the words that have co-occurred with some frame
	 * @param allFrames
	 * @param sg
	 * @param restriction
	 * @return
	 */
	IntList sortFrames(IntCollection allFrames, StatisticsGenerator sg,
			IntSet restriction, int iteration);
	/**
	 * this method sorts all the words that have co-occurred with frames according to some score derived
	 * from the given statistics, the restriction are all the frames assigned to the class of interest in
	 * this iteration, the best scoring word is first in the returned list
	 * @param allWords
	 * @param statisticsGenerator
	 * @param frames2
	 * @return
	 */
	IntList sortWords(IntCollection allWords,
			StatisticsGenerator statisticsGenerator, IntSet restriction,
			int iteration);
}